package edu.sctu.zhoudie.mouth201505.day20150504.shape;

/**
 * Created by user13 on 2015/5/5.
 */
public class ShapeClient {
    public static void main(String[] args) {

        // 可维护性
        Shape shape = new Rectange();
        System.out.println(calArea(shape));

//        Rectange rectange = new Rectange();
//        System.out.println(rectange.calArea());
//
//        Square square = new Square();
//        System.out.println(square.calArea());
//
//        Shape shape = new Rectange();
//        System.out.println(shape.calArea());
//
//        shape = new Square();
//        System.out.println(shape.calArea());
    }

    public static int calArea(Shape shape){
        return shape.calArea();
    }
}
